package com.itheima.zuoye;
import java.util.*;
public class Demo2 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        Random ran=new Random();
        System.out.println("输入你的奖项个数:");
        int count=sc.nextInt();
        int[] data=new int[count];
        for (int i = 0; i <data.length ; i++) {
            data[i]=ran.nextInt(100);
        }
//        int count=0;,输入-1就结束程序
        while(true){
            System.out.println("请输入你要抽奖的编号:");
            count=sc.nextInt();
            if(count==-1) break;
            for (int i = 0; i < data.length; i++) {
                if(count==data[i]){
                    System.out.println("恭喜你中奖了!!!");
                }
                else{
                    System.out.println("不好意思,下次再来!!!");
                }
            }
        }

    }


}
